﻿using UnityEngine;
using System.Collections;

public enum UIEventLoad
{
    Load = 0,
    Finish,
    Max,
}
public class Load : UIBase
{
    public override void ProcessEvent(MsgBase tmpMsg)
    {
        switch ((UIEventLoad)tmpMsg.msgId)
        {
            case UIEventLoad.Load:

                break;
            case UIEventLoad.Finish:

                break;
        }
    }


    // Use this for initialization
    void Start()
    {
        msgIds = new ushort[] {
            (int)UIEventLoad.Finish,
            (int)UIEventLoad.Load
        };

        RegistSelf(this, msgIds);

        UIManager.Instance.GetGameObject("ButtonLeft").GetComponent<UIBehaviour>().AddButtonListener(ButtonClick);
    }

    public void ButtonClick()
    {
        //其他模块发的消息
        MsgBase msg = new MsgBase((ushort)UIEventLoad.Load);
        SendMsg(msg);
    }
}
